package com.noreply.demo.controller;

import com.fasterxml.jackson.databind.util.JSONPObject;
import com.noreply.demo.dto.Req;
import com.noreply.demo.dto.Resp;
import org.springframework.web.bind.annotation.*;

/**
 * @author noreply
 * @description
 * @datetime 2021/6/23 17:37
 */
@RestController
public class HiController extends BaseController{
    @GetMapping("/hi/{id}")
    public Resp hello(@PathVariable("id") int id) {
        return success(10/id);
    }

    @PostMapping("convert")
    public Object convert(@RequestBody Req req) {
        System.out.println(req.toString());
        return req;
    }

}
